<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        div {
            border: 1px solid black;
        }

        .div1 {
            margin: 2em;
            padding: 1em;
        }

        .div2 {
            margin: 50px;
            padding: 16px;
        }

        .div3 {
            margin: 50px 20px;
            padding-left: 50%;
        }

        .div4 {
            margin-left: 50%;
            padding-left: 10%;
        }
    </style>
</head>
<body>
    <div class="div1">
        div
    </div>

    <div class="div2">
        div
    </div>

    <div class="div3">
        div
    </div>

    <div class="div4">
        div
    </div>
</body>
</html>